package com.tuanzi.loan.web.lazy.businesssystem;

import com.tuanzi.loan.business.service.businesssystem.BusinessMainService;
import com.tuanzi.loan.core.lazy.BaseLazyDataModel;
import com.tuanzi.loan.core.util.SpringContextHolder;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.businesssystem.BusinessMainRequest;
import com.tuanzi.loan.vo.response.businesssystem.BusinessMainResponse;
import org.springframework.data.domain.Page;


public class BusinessMainLazyDataModel extends BaseLazyDataModel<BusinessMainRequest, BusinessMainResponse> {
    private BusinessMainService service = SpringContextHolder.getBean(BusinessMainService.class);

    public BusinessMainLazyDataModel(BusinessMainRequest request) {
        super(request);
    }

    @Override
    protected Page<BusinessMainResponse> doLoad(PageSearcher<BusinessMainRequest> pageSearcher) {
        return service.list(pageSearcher);
    }
}
